package com.company;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Test {
    public static void main(String[] args) {
//        ReentrantLock lock = new ReentrantLock(); //(1)
//        Condition condition = lock.newCondition(); //(2)
//        lock.lock(); //(3)
//        try {
//            System.out.println("begin wait");
//            condition.await(); //(4)
//            System.out.println("end wait");
//        } catch (Exception e) {
//            e.printStackTrace();
//        } finally {
//            lock.unlock(); //(5)
//        }
//        lock.lock(); //(6)
//        try {
//            System.out.println("begin signal");
//            condition.signal(); //(7)
//            System.out.println("end signal");
//        } catch (Exception e) {
//            e.printStackTrace();
//        } finally {
//            lock.unlock(); //(8)
//        }

        System.out.println( Long.parseLong(filterStr("2021-10-25 15:28:19")) );


        int a[] = new int[10];
        a[0] = 10;

        System.out.println( a[2] );

    }
    public static  String filterStr(String str){
        String regEx="[^0-9\\.]";
        Pattern p = Pattern.compile(regEx);
        Matcher m = p.matcher( str );
        return m.replaceAll("");
    }

}
